﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Infusion.Silverlight.Controls.OpenOfficeXML.WordProcessing
{
    public class FontTablePart : OpenXmlPart
    {
        private List<FontPart> fonts = new List<FontPart>();

        public sealed override string ContentType
        {
            get
            {
                return "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml";
            }
        }

        public sealed override string RelationshipType
        {
            get
            {
                return "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";
            }
        }

        protected internal sealed override string TargetName
        {
            get
            {
                return "fontTable";
            }
        }

        protected internal sealed override string TargetPath
        {
            get
            {
                return "word";
            }
        }
    }

    #region : FontPart :
    public class FontPart
    {
        #region Class Variables...
        private string altName;
        private FontCharSet charSet;
        private FontFamilyType family;
        private string name;
        #endregion

        #region Constructor(s)...
        #region FontPart(string name)
        public FontPart(string name) :
            this(name, string.Empty, FontCharSet.OEM, FontFamilyType.Auto)
        {
        }
        #endregion

        #region FontPart(string name, string altName, FontCharSet charSet, FontFamilyType family)
        public FontPart(string name, string altName, FontCharSet charSet, FontFamilyType family)
        {
            this.name = name;
            this.altName = altName;
            this.charSet = charSet;
            this.family = family;
        }
        #endregion
        #endregion

        #region Properties...
        #region AltName
        public string AltName
        {
            get { return altName; }
            set { altName = value; }
        }
        #endregion

        #region Name
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        #endregion

        #region CharSet
        public FontCharSet CharSet
        {
            get { return charSet; }
            set { charSet = value; }
        }
        #endregion

        #region Family
        public FontFamilyType Family
        {
            get { return family; }
            set { family = value; }
        }
        #endregion
        #endregion
    }
    #endregion
}
